package org.example.client;

import org.example.service.UserService;

public class ClientBootstrap {

    public static void main(String[] args) throws InterruptedException {

        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class);

        //2.循环给服务器写数据
        int i = 0;
        while (true) {
            i++;
            String result = proxy.sayHello("RUOK!!" + i);
            System.out.println("客户端接受:" + result + ",i=" + i);
            Thread.sleep(2000);
        }
    }
}
